﻿

<script type="text/javascript">

    // Begin PicNet Table Filter

    $(document).ready(function () {
        // Initialise Plugin


        var grid2 = $('#filterTable');
        var options2 = {
            filteringRows: function (filterStates) {
                grid2.addClass('filtering');
            },
            filteredRows: function (filterStates) {
                grid2.removeClass('filtering');
                setRowCountOnGrid2();
            }
        };
        function setRowCountOnGrid2() {
            var rowcount = grid2.find('tbody tr:not(:hidden)').length;
            $('#rowcount').text('(Rows: ' + rowcount + ')');
        }

        grid2.tableFilter(options2); // No additional filters			
        setRowCountOnGrid2();


    });
    // Einde PicNet Table Filter


</script>
@model IEnumerable<ViVa.ActiveDirectory.Logging>@{
    ViewBag.Title = ViewData["paginaNaam"];
    Page.Title = ViewData["paginaNaam"];
    ViewData["SecurityLevel"] = "isHelpdesk";
}

@if (Model.FirstOrDefault().Writable)
{
   @Html.Partial("~/Views/Log/_AddLogChange.cshtml")
}

<br />

<table id='filterTable'>
    <thead>        <tr style="background-color: #DDDDDD; text-align: left; color: Gray;">        @if (Model.FirstOrDefault().Writable)
        {            <th style="width:15px; padding: 5px;">&nbsp</th>
        }            <th style="padding: 5px;">Wanneer</th>            @if (Model.FirstOrDefault().Custom_wie)
            {<th style="padding: 5px;">Wie</th>}
            else
            {<th filter-type='ddl' style="padding: 5px;">Wie</th>}            <th style="padding: 5px;">Wat</th>            <th nowrap="nowrap" style="padding: 5px;"><span id='rowcount'></span></th>        </tr>    </thead>
    <tbody>        @foreach (ViVa.ActiveDirectory.Logging log in @Model)
        {
            <tr>
                @if (log.Writable)
                {                    
                <td style="width: 15px;"><a href="@Url.Action("verwijderLog", "Log", log)"><div class="DeleteButton" title="Verwijder log..." onclick="if (!confirm('Verwijder deze log?')) return false">&nbsp</div></a> &nbsp</td>
                }
                <td nowrap="nowrap" style="width: 20%;">@log.Wanneer</td>
                <td nowrap="nowrap" style="width: 5%;">@log.Wie</td>
                <td style="width: 69%;">@log.Wat</td>
            </tr>
        }    </tbody></table>
